﻿@model ZDSoft.UPMS.Model.BusinessPart.Course

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Create</title>
    <script src="../../Scripts/PageCreater/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/PageCreater/Scripts/PageCreater.js" type="text/javascript"></script>
    <link href="../../Scripts/PageCreater/Css/Style.css" rel="stylesheet" type="text/css" />

     <script type="text/javascript">
         $(document).ready(function () {
             var str = "Name,课程名,false,text,notnull,"
            + "lesson,课时,false,text,notnull,"
            + "WorkTiems,布置作业次数,false,text,notnull,"
             + "IsActive,状态,false,select|激活!true|注销!false,notnull,"
             + "Opreate,操作,false,null,null";
             CreatePageFram(str);
         })

         function SubmitPage() {
             if (!InitValidator()) {
                 return false;
             }

             $.ajax({
                 type: "POST",
                 url: "/Course/Create",
                 data: { Name: function () { return $("#Name").val() }, lesson: function () { return $("#lesson").val() }, WorkTiems: function () { return $("#WorkTiems").val() }, IsActive: function () { return $("#IsActive").val() } },
                 success: function () {
                     alert("创建成功！");
                     window.location = "/Course/Index";
                 }
             });
         }
    </script>
</head>
<body>
    <div class="Content">
        <p>
            @Html.ActionLink("返回列表", "Index")
        </p>
        <form id="Info" method="post">
        <fieldset>
            <legend>请输入基本信息</legend>
            <div id="divContent">
            </div>
        </fieldset>
        <p>
            <input id="btnSubmit" type="button" value="保存" class="btn3" onclick="SubmitPage()" /></p>
        </form>
    </div>
</body>
</html>
